package com.and.video.domain.exception;

public class ConditionException extends RuntimeException{

    // serialVersionUID 保证序列化兼容性
    private static final long serialVersionUID = 1L;

    // 存储错误码
    private String code;

    // 指定错误码和消息
    public ConditionException(String code, String name){
        super(name);
        this.code = code;
    }

    // 默认错误码为 "500"
    public ConditionException(String name){
        super(name);
        code = "500";
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }
}
